﻿@model GameSchoolWeb.Models.ExamIndexModelView
<div id="templatemo_content">
    @{
        ViewBag.Title = "Exam Details";
    }
    <div class="templatemo_box">
        <!DOCTYPE html>
        <html>
        <head>
            <title>Yfirlit yfir próf</title>
        </head>
        <body>
            <h2>
                Yfirlit yfir próf</h2>
            <div class="body">
                @Html.HiddenFor(model => model.Exam.id)
                <div class="display-label">
                    <strong>Titill</strong></div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.Exam.strTitle)
                </div>
                <div class="display-label">
                    <strong>Dagsetning</strong></div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.Exam.dDateAdded)
                </div>
                <div class="display-label">
                    <strong>Stig</strong></div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.Exam.nPoints)
                </div>
                <div class="display-label">
                    <strong>Borð</strong></div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.Exam.levelId)
                </div>
                @foreach (var item in Model.Question)
                {
                    <div class="display-label">
                        <strong>Spurning</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => item.strTitle)
                    </div>

                    <div class="display-label">
                        <strong>Valmöguleiki 1</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => item.striOptionOne)
                    </div>

                    <div class="display-label">
                        <strong>Valmöguleiki 2</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => item.strOptionTwo)
                    </div>

                    <div class="display-label">
                        <strong>Valmöguleiki 3</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => item.strOptionThree)
                    </div>

                    <div class="display-label">
                        <strong>Valmöguleiki 4</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => item.strOptionFour)
                    </div>

                    <div class="display-label">
                        <strong>Valmöguleiki 5</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => item.strOptionFive)
                    </div>

                    <div class="display-label">
                        <strong>Rétt svar</strong></div>
                    <div class="display-field">
                        @Html.DisplayFor(model => item.nCorrectOption)
                    </div>
                }
                @if (User.IsInRole("Kennari"))
                {
                    <p>
                        @Html.ActionLink("Bæta við spurningu", "AddQuestions", new { id = Model.Exam.id })
                    </p>
                }
                <hr />
                <p>
                    @Html.ActionLink("Til baka", "GetExams", new { id = Model.Exam.levelId })
                </p>
            </div>
            </div>
        </body>
        </html>
    
